Carbon


SameProcess

Header: Processes.h Carbon status: Supported

Determines whether two process serial numbers specify the same process.

OSErr SameProcess (
    const ProcessSerialNumber *PSN1, 
    const ProcessSerialNumber *PSN2, 
    Boolean *result
);
PSN1

A process serial number.

PSN2

A process serial number.

result

On return, a pointer to a Boolean value which is TRUE if the process serial numbers passed in PSN1 and PSN2 refer to the same process; otherwise FALSE.

function result

A result code.

DISCUSSION

Do not attempt to compare two process serial numbers by any means other than the SameProcess function, because the interpretation of the bits in a process serial number is internal to the Process Manager.

The values of PSN1 and PSN2 must be valid process serial numbers returned from LaunchApplication, GetNextProcess, GetFrontProcess, GetCurrentProcess, or a high-level event. You can also use the constant kCurrentProcess to refer to the current process.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)